//
// Created by chizuru on 2025/9/29.
//

#pragma once
#include <cstdint>
#include "SensorTPController.h"

class SensorTPService :public SensorTPController{
public:
    explicit SensorTPService(SensorTPDevice& s, std::shared_ptr<TinyXmlRegisterTPMap>  t, RetryPolicy rp = {});
    ~SensorTPService() = default;

    OperationResult checkIfSerialPortIsConnected();
    OperationResult checkIfHasSensorConnected();
    OperationResult initSlaveAddress();
    OperationResult batchSetInitRegisters();
    OperationResult getTemperature(float& value);
    OperationResult getPressure(float& value);
private:
    uint16_t dev{0x0000}; /* 广播地址 */
};
